<template>
    <div class="Box">
        <a class="imgBox"  href="#">
            <img :src="props.pic"/>
        </a>
        <div class="infoBox">
            <a href="#">{{ props.title }}</a>
            <p>
                <span v-show="props.isAd">广告</span>
                <span>{{ props.desc }}</span>
            </p>
        </div>
    </div>
</template>

<script lang="ts" setup>
interface Props{
    pic:string  //img
    title:string
    desc:string
    isAd:boolean
}
const props = defineProps<Props>()
</script>

<style lang="scss" scoped>
@media  screen and (min-width: 0) and (max-width: 1600px){
    .Box{
        height: 82px;
    }
}
@media  screen and (min-width: 1600px) and (max-width: 2000px){
    .Box{
        height: 90px;
    }
}
p{
    padding: 0;
    margin: 0;
}
.Box{
    width: 100%;
    display: flex;
}
.imgBox{
    width: 40%;
    height: 100%;
    position: relative;
    & img{
        border-radius: 4px;
        width: 100%;
        height: 100%;
    }
}
.infoBox{
    margin-left: 10px;
    width: 60%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    text-align: left;
    & a:nth-child(1){
        width: 100%;
        font-size: 15px;
        color: #18191C;
        line-height: 18px;
        max-height: 36px;
        @include tweLineShow;
    }
    & a:nth-child(1):hover{
        color: #008AC5;
    }
    & p:nth-child(2){
        margin-top: 5px;
        width: 100%;
        display: flex;
        justify-content: start;
        align-items: center;
        font-size: 13px;
        color: #9499A0;
    }
    & p:nth-child(2) span:nth-child(1){
        padding: 0 5px;
        font-size: 12px;
        border-radius: 4px;
        border: 1px solid #E3e5e7;
        margin-right: 5px;
    }

}
</style>